$(document).ready(function () {

    // $.ajax({
    //     url: serverApi + "/hOmsOrder/selectById?id=" + $.cookie('tempId'),
    //     type: "GET",
    //     success: function (result) {
    //         if (result.code === 200) {
    //             //赋值
    //             $(".createTime").html(result.data.createTime)
    //             $(".doctorName").html(result.data.doctorName)
    //             //若有开处方
    //             $.ajax({
    //                 url: serverApi3 + "/OmsOrderDrug/selectListByOrderId?orderId=" + $.cookie('tempId'),
    //                 type: "GET",
    //                 success: function (result) {
    //                     if (result.data !== null) {
    //                         let details = result.data;
    //                         for (let index in details) {
    //                             $(".doctorOrderDrugTiemVOList").append('\n' +
    //                                 '        <tr>\n' +
    //                                 '            <td style="color: black">' + details[index].drugsName + '</td>\n' +
    //                                 '            <td style="color: black">' + details[index].hospDrugManuf + '</td>\n' +
    //                                 '            <td style="color: black">' + details[index].dosage + '*1' + details[index].drunit + '</td>\n' +
    //                                 '            <td style="color: black">' + details[index].useDays + '天</td>\n' +
    //                                 '            <td style="color: black">' + details[index].number + details[index].drunit + '</td>\n' +
    //                                 '        </tr>')
    //                         }
    //                     } else {
    //                         //若无开处方
    //                         $(".chuFang").css("display", "none")
    //                     }
    //                 }
    //             });
    //             //若有开医技
    //             let list = result.data.list;
    //             if (list.length > 0) {
    //                 $("#select_array").append('<input class="clear-bg hot-signle" type="text" value="' + list[index].inspectName + '" disabled="disabled">')
    //             } else {
    //                 //若无开医技
    //                 $(".yiji").css("display", "none")
    //             }
    //             //若有开建议
    //             if (result.data.advise != null) {
    //                 $(".advise").html(result.data.advise)
    //             } else {
    //                 $(".jianYi").css("display", "none")
    //             }
    //         }
    //     }
    // });

    $.ajax({
        url: serverApi3 + "/order/findChartVideoListDetails?id=" + $.cookie('tempId'),
        type: "POST",
        success: function (result) {
            if (result.code === 200) {
                //赋值
                $(".createTime").html(result.data.createTime)
                $(".doctorName").html(result.data.doctorName)
                //若有开处方
                let details = result.data.details;
                for (let index in details) {
                    $(".doctorOrderDrugTiemVOList").append('\n' +
                        '        <tr>\n' +
                        '            <td style="color: black">' + details[index].drugsName + '</td>\n' +
                        '            <td style="color: black">' + details[index].hospDrugManuf + '</td>\n' +
                        '            <td style="color: black">' + details[index].dosage + '*' + details[index].specifications + '</td>\n' +
                        '            <td style="color: black">' + details[index].useDays + '天</td>\n' +
                        '            <td style="color: black">' + details[index].number + details[index].drunit + '</td>\n' +
                        '        </tr>')
                }
                //若有开医技
                let list = result.data.list;
                if (list.length > 0) {
                    $("#select_array").append('<input class="clear-bg hot-signle" type="text" value="'+list[index].inspectName+'" disabled="disabled">')
                }else {
                    //若无开医技
                    $(".yiji").css("display","none")
                }
                //若有开建议
                if (result.data.advise!=null){
                    $(".advise").html(result.data.advise)
                }else {
                    $(".jianYi").css("display","none")
                }
            }
        }
    });
});